package com.obligatorio.ejb;

import java.util.List;

import javax.ejb.EJB;
import javax.ejb.Stateless;

import org.apache.log4j.Logger;

import com.obligatorio.domain.Sector;
import com.obligatorio.persist.dao.SectorDAOLocal;

@Stateless
public class ManejadorSectorBean implements ManejadorSector {
	private static final Logger log = Logger
			.getLogger(ManejadorSectorBean.class.getName());
	@EJB
	private SectorDAOLocal sectorDAO;

	@Override
	public List<Sector> ObtenerTodosLosSectores() throws Exception {
		log.info("ObtenerTodosLosSectores()");
		return sectorDAO.ObtenerTodosLosSectores();
	}

	@Override
	public Sector ObtenerUnSector(String name) throws Exception {
		return sectorDAO.ObtenerUnSector(name);
	}

}
